home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2797 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. Path: news.ccs.queensu.ca!news
  2. From: dmurdoch@mast.queensu.ca (Duncan Murdoch)
  3. Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
  4. Subject: Re: C++ with Zapp vs. Delphi
  5. Date: Fri, 19 Jan 1996 18:48:20 GMT
  6. Organization: Queen's University, Kingston
  7. Message-ID: <30ffe557.16481026@130.15.126.54>
  8. References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <DBk8wg2yqjbB083yn@iaccess.za> <4d7pmb$48c8@tigger.cc.uic.edu> <4dk38h$gdr@merlin.delphi.com> <4dksp1$3d6c@tigger.cc.uic.edu> <30fe666e.3349285@130.15.126.54> <4dmjt8$6sv@crc-news.doc.ca> <30ff9519.1799465@130.15.126.54> <4doe07$4u8@crc-news.doc.ca>
  9. NNTP-Posting-Host: djm.mast.queensu.ca
  10. X-Newsreader: Forte Agent .99c/16.141
  11.  
  12. On 19 Jan 1996 15:39:51 GMT, Slobodan Celenkovic <slobodan@cs.unh.edu>
  13. wrote:
  14.  
  15. >Sorting algorithm is still in the list class (binary search, quick sort,
  16. >..). However the item comparison shouldn't go into the list class, but
  17. >item classes. Why? Because items "know" how to compare themselves to
  18. >other items.
  19.  
  20. I hate to repeat myself, but what if I want to put something into two
  21. different lists?  Then the item has to know which list you're calling
  22. its Compare from.  Makes a lot more sense to me to have the Compare as
  23. a method of the list.  Then my AlphabeticalList can compare
  24. alphabetically, and my NumericalList can compare numerically.
  25.  
  26. >  Once again see Booch.
  27.  
  28. Sorry, but if the reasoning is so obscure or complicated that you
  29. can't just summarize it for me, I probably wouldn't find it convincing
  30. anyways.
  31.  
  32. Duncan Murdoch
  33.